<?php
defined('IN_PHPCMS') or exit('No permission resources.');
pc_base::load_sys_class('model', '', 0);
class category_model extends model {
	public $table_name = '';
	public function __construct() {
		$this->db_config = pc_base::load_config('database');
		$this->db_setting = 'default';
		$this->table_name = 'category';
		parent::__construct();
	}
    /**
     * 说明: 查询对应站点的栏目
     * @param $m  模块名称
     */
    function get_cates($siteid){
        if(!ROUTE_M) return FALSE;
        return $this->select(array('type' => 0, 'siteid' => $siteid,'parentid'=>0,'ismenu'=>1),
            '*', '', $order = 'listorder ASC,catid ASC');
    }
}
?>